/*
Kane and Anson
"Deficit Attention Disorder"
Political Behavior

Replication Files For:  Lucid Experiment

*/

*******************
*LUCID EXPERIMENT
*******************

use "Kane_Anson_ExpData_Lucid.dta", replace
ssc install blindschemes, replace all // install for "plotplain" scheme


*FIGURE 3 (TOP PANEL)
mean DVscale_01, over(Inparty_Outparty_Ind)
estimates store InOutIndmeans

coefplot InOutIndmeans, vertical recast(bar) barwidth(0.5) fcolor(*.5) xline(2.5) ///
ciopts(recast(rcap)) citop  scheme(plotplain) ///
ylab(.55(.05).70) ///
coeflabels(c.DVscale_01@0.Inparty_Outparty_Ind= "Inparty Presidents" c.DVscale_01@1.Inparty_Outparty_Ind = "Outparty Presidents" ///
c.DVscale_01@2.Inparty_Outparty_Ind = "Republican Presidents" c.DVscale_01@3.Inparty_Outparty_Ind = "Democratic Presidents") ///
xsize(6.5) ysize(3.7) ///
ytitle(Perceived Importance of Addressing Deficit Spending)
*Note: Minor edits were manually made to the graph for aesthetic purposes


*FIGURE 3 (BOTTOM PANEL)

reg DVscale_01 i.Inparty_Outparty##c.LeanPartisanStrong  //

margins, dydx(Inparty_Outparty) at(LeanPartisanStrong=(0(1)2))

marginsplot, scheme(plotplain) legend(ring(0) pos(1)) ///
plotopts(mcolor(black)) ciopts(lcolor(black)) ///
title("")  ///
xtitle("") ///
xlabel(#3, valuelabel) xmtick(, nolabels noticks) ///
addplot(hist LeanPartisanStrong,  discrete barwidth(.1) gap(30) title( " ") ylabel(0(.01).1) ///
ytitle("Effect of Outparty President on" "Importance of Deficit", size(small)) ///
xtitle("") ///
yaxis(2) yscale(alt axis(2)) percent ///
ylabel(0 "0%" 5 "5%" 10 "10%" 15 "15%" 20 "20%" 25 "25%" 30 "30%" 35 "35%" 40 "40%" , labcolor(black*.9) axis(2)) ///
ytitle("Percent of Sample", axis(2) orientation(rvertical) size(small))  fcolor(white%10) lcolor(black*.5)) ///
legend(off) ///
xsize(6.5) ysize(4.5) ///
graphregion(margin(small)) 



*FIGURE 4

*Full Model 
reg DVscale_01 i.DAD4groups_inparty_outparty // (reference group = pure control)
estimates store fullmod

*Democrats 
reg DVscale_01 i.DAD4groups_inparty_outparty if pid7<=3 // (reference group = pure control)
estimates store demmod

*Republicans 
reg DVscale_01 i.DAD4groups_inparty_outparty if pid7>=5 // (reference group = pure control)
estimates store repmod

coefplot fullmod demmod repmod, drop(_cons) xline(0) scheme(plotplain) ///
levels(95) /// 
legend(ring(1) pos(6) col(3)) ///
xlab(-.06(.02).06) ///
ylab(,angle(vertical)) ///
xsize(6.5) ysize(4.5)
*Note: Minor edits were manually made to the graph for aesthetic purposes


*Near partisan parity on importance of addressing deficit
tabstat DVscale_01, by(D0R1)


**SUPPLEMENTAL APPENDIX


 *TABLE A1
tabstat hh_income_clean age female, st(mean p50 sd)
tab1 race_clean pid7 ideology

*TABLE C1 (Bottom)
bysort D0R1I2: tab fmc_tr Treatment_RepDemPres, column chi2


*TABLE C2 

*Top Question (Lucid Row)

*Democratic Respondents
bysort Treatment_RepDemPres: tab FMC_TI1_correct if D0R1I2==0

*Republican Respondents
bysort Treatment_RepDemPres: tab FMC_TI1_correct if D0R1I2==1

*Independent Respondents
bysort Treatment_RepDemPres: tab FMC_TI1_correct if D0R1I2==2


*Bottom Question (Lucid Row)

*Democratic Respondents
bysort Treatment_RepDemPres: tab FMC_TI2_correct if D0R1I2==0 

*Republican Respondents
bysort Treatment_RepDemPres: tab FMC_TI2_correct if D0R1I2==1 

*Independent Respondents
bysort Treatment_RepDemPres: tab FMC_TI2_correct if D0R1I2==2 



*TABLE C3 (Bottom Portion)

*Rating Democratic Presidents Across Democratic President vs. Republican President Treatment (by party)
bysort D0R1: ttest smc_dprez if D0R1!=., by(Treatment_DemRepPres) //  First (second) set of results = column 2 (4) in TABLE C3

*Rating Republican Presidents Across Democratic President vs. Republican President Treatment (by party)
bysort D0R1: ttest smc_rprez if D0R1!=., by(Treatment_DemRepPres) //  First (second) set of results = column 3 (5) in TABLE C3


*TABLE D1 (Bottom Portion)

*All Partisans
reg DVscale_01 i.DAD4groups_inparty_outparty // (reference group = pure control)

*Democrats
reg DVscale_01 i.DAD4groups_inparty_outparty if D0R1I2==0 // (reference group = pure control)

*Republicans
reg DVscale_01 i.DAD4groups_inparty_outparty if D0R1I2==1 // (reference group = pure control)

*Independents
reg DVscale_01 i.DAD4groups if D0R1I2==2 // (reference group = pure control)

	*Non-significant interaction between treatment and party (cited in text)
reg DVscale_01 i.Inparty_Outparty##i.D0R1 


*TABLE D2 ("Lucid Study" column)

reg DVscale_01 i.Inparty_Outparty##c.LeanPartisanStrong  
